<template>
   <div class="activity-like views-container">
       <div class="wlm-table">
           <div class="wlm-table-header">
            <el-form :model="tableFormatData.rewardRecord.files"  size="small" label-width="85px" class="retail-form" label-position="right">
                <el-form-item label="" class="filter">
                    <el-form-item label="用户昵称：">
                        <el-input @keyup.enter.native="filesSerch" v-model="tableFormatData.rewardRecord.files.user_name" placeholder="请输入用户昵称" style="width:160px;"></el-input>
                    </el-form-item>
                  
                </el-form-item>
                <el-form-item label="" class="filter-btns">
                    <el-button type="primary" @click="filesSerch">筛选</el-button>
                    <el-button type="text"  @click="filesEmpty">清空筛选条件</el-button>
                </el-form-item>
            </el-form>
        </div>
           <div class="wlm-table-content">
                 <el-table :ref="tableFormatData.rewardRecord.key" :data="tableFormatData.rewardRecord.tableData" @selection-change="handleSelectionChange" style="width: 100%">
                        <el-table-column prop="date" label="活动名称" min-width="60">
                            <template slot-scope="scope">
                                <span>{{scope.row.name}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="date" label="支付下单用户" min-width="60">
                            <template slot-scope="scope">
                            <span>{{scope.row.nickName}}</span>
                            </template>
                        </el-table-column>
                        <!-- <el-table-column prop="date" label="是否领取" min-width="60">
                            <template slot-scope="scope">
                              
                            </template>
                        </el-table-column> -->
                        <el-table-column prop="date" label="领取奖励" min-width="60">
                            <template slot-scope="scope">
                                <span>{{scope.row.reward_text}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="date" label="是否需要分享" min-width="60">
                            <template slot-scope="scope">
                                <span v-if="scope.row.is_share==1">需要</span>
                                <span v-if="scope.row.is_share==2">不需要</span>
                            </template>
                        </el-table-column>
                           <el-table-column prop="date" label="领取时间" min-width="60">
                            <template slot-scope="scope">
                                {{scope.row.create_time}}
                            </template>
                        </el-table-column>
                    
                 </el-table>
                  <div class="pagination-content flex-row flex-justify-e flex-align-c">
                    <el-pagination :disabled="!hasTableData" @size-change="listPageChange" @current-change="listPageChange" :current-page.sync="tableFormatData.rewardRecord.pagination.page" :page-sizes="tableFormatData.rewardRecord.pagination.pagesizes" :page-size.sync="tableFormatData.rewardRecord.pagination.list_rows" layout="total, sizes, prev, pager, next, jumper" :total="hasTableData?tableFormatData.rewardRecord.pagination.total : 0">
                    </el-pagination>
                </div>
           </div>
       </div>
   </div>
</template>
<script>
import { getPMRecordList} from "@/api/application";
    import mixins from '@/mixins/mixins'

export default {
mixins: [mixins.getters('Table')],
 name:'rewardRecord',
    data () {
        return {
           tableFormatData: {
                current: 'rewardRecord',
                rewardRecord: {
                    key: 'rewardRecord',
                    api: {
                        getList:getPMRecordList,
                    },
                    tableData: [],
                    files: {
                    },
                    // rowId: "id",
                      pagination: {
                        page: 1,
                        list_rows: 10,
                        pagesizes: [10, 20, 50],
                        total: 0
                    }
                }
            }, 
        }
    },
    methods: {
        
        //  handstopbtn(id,status){
            
        //      this.$confirm( `${status==1?"此操作将暂停活动，是否继续操作？":"此操作将继续活动，是否继续操作？"}`, '提示', {
        //         confirmButtonText: '确定',
        //         cancelButtonText: '取消',
        //         type: 'warning'
        //         }).then(() => {
        //              editStatusPayMarketing({id:id,status:status==1?2:1}).then(res=>{
        //                  if(res.data.code==1){
        //                      this.$message.success(res.data.msg)
        //                      this.filesSerch()
        //                  }
        //      })
        //         }).catch(() => {
        //         this.$message({
        //             type: 'info',
        //             message: '已取消删除'
        //         });          
        //         });
        //  },
    }
}
</script>